Method: Dry::Schema::Path#<=>
- Defined in:
- lib/dry/schema/path.rb
#<=>(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
79 80 81 82 83 84 85 |
# File 'lib/dry/schema/path.rb', line 79 def <=>(other) return keys.length <=> other.keys.length if include?(other) || other.include?(self) first_uncommon_index = (self & other).keys.length keys[first_uncommon_index] <=> other.keys[first_uncommon_index] end |